package com.qianbei.common.net.view;

import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.qianbei.common.R;
import com.qianbei.common.base.BaseApplication;

public class GoldAlert {

	private Toast msgToast;
	private TextView mPayTv;
	private ImageView mPayIcon;

	public GoldAlert() {
		View msgView = View.inflate(BaseApplication.mApplication, R.layout.common_gold_alert, null);
//				.inflate(R.layout.hb_msgalert, null);
		mPayTv = (TextView) msgView.findViewById(R.id.tv_pay);
		mPayIcon = (ImageView) msgView.findViewById(R.id.icon);

		msgToast = new Toast(BaseApplication.mApplication);
//		msgToast.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
		msgToast.setGravity(Gravity.CENTER,0,0);
		msgToast.setDuration(Toast.LENGTH_SHORT);
		msgToast.setView(msgView);
	}

	public void show(String msgStr) {
		if (msgStr != null && !"".equals(msgStr)) {
				mPayTv.setText(msgStr);
			}

			msgToast.show();
	}


}
